package com.coderman.common.lightmonitor.mapper;


import com.coderman.common.lightmonitor.entity.ServerServiceThreadEntity;

import java.util.List;

/**
 * @Description:服务器进程表DAO接口
 * @Author：
 * @CreateTime：2019-09-10 11:14:28
 * @version v1.0
 */
public interface ServerServiceThreadMapper {


    /**
	 *
	 * @Title: save
     * @Description:新增或修改
     * @author:
     * @param @param dto
     * @param @param userId
     * @return 当前插入记录id
     * @throws
     */
     Long insert(ServerServiceThreadEntity Entity) throws Exception;

     /**
      *
      * @Title: delete
      * @Description: 通过id删除数据
      * @author:
      * @param @param id
      * @return 0/1    返回类型
      * @throws
      */
     int delete(long id)  throws Exception;

     /**
      *
      * @Title: getById
      * @Description: 通过id查询
      * @author:
      * @param @param id
      * @return ServerProcessorEntity   返回类型
      * @throws
      */
     ServerServiceThreadEntity getById(Long id) throws Exception;


      /**
       *
       * @Title: getById
       * @Description: 通过id查询
       * @author:
       * @param @param id
       * @return 0/1
       * @throws
       */
    //  int  update(ServerServiceThreadEntity entity) throws Exception;


    /**
     * 根据服务器配置id获取服务器进程数据列表
     * @param serverConfigId
     * @return
     * @throws Exception
     */
    List<ServerServiceThreadEntity> getByServerConfigId(Long serverConfigId) throws Exception;


    /**
     * 根据所属服务id，pid获取近30分钟内数据
     * @param serverServiceId
     * @param pid
     * @return
     * @throws Exception
     */
    List<ServerServiceThreadEntity> getByServerConfigIdAndProcessorIdList(Long serverServiceId, Long pid) throws Exception;



}